package com.ruoyi.yijing.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.yijing.mapper.YjCustomerGuaiMapper;
import com.ruoyi.yijing.domain.YjCustomerGua;
import com.ruoyi.yijing.service.IYjCustomerGuaiService;

/**
 * 用户占卜到的卦Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-22
 */
@Service
public class YjCustomerGuaiServiceImpl implements IYjCustomerGuaiService 
{
    @Autowired
    private YjCustomerGuaiMapper yjCustomerGuaiMapper;

    /**
     * 查询用户占卜到的卦
     * 
     * @param id 用户占卜到的卦主键
     * @return 用户占卜到的卦
     */
    @Override
    public YjCustomerGua selectYjCustomerGuaiById(Long id)
    {
        return yjCustomerGuaiMapper.selectYjCustomerGuaiById(id);
    }

    /**
     * 查询用户占卜到的卦列表
     * 
     * @param yjCustomerGuai 用户占卜到的卦
     * @return 用户占卜到的卦
     */
    @Override
    public List<YjCustomerGua> selectYjCustomerGuaiList(YjCustomerGua yjCustomerGuai)
    {
        return yjCustomerGuaiMapper.selectYjCustomerGuaiList(yjCustomerGuai);
    }

    /**
     * 新增用户占卜到的卦
     * 
     * @param yjCustomerGuai 用户占卜到的卦
     * @return 结果
     */
    @Override
    public int insertYjCustomerGuai(YjCustomerGua yjCustomerGuai)
    {
        yjCustomerGuai.setCreateTime(DateUtils.getNowDate());
        return yjCustomerGuaiMapper.insertYjCustomerGuai(yjCustomerGuai);
    }

    /**
     * 修改用户占卜到的卦
     * 
     * @param yjCustomerGuai 用户占卜到的卦
     * @return 结果
     */
    @Override
    public int updateYjCustomerGuai(YjCustomerGua yjCustomerGuai)
    {
        return yjCustomerGuaiMapper.updateYjCustomerGuai(yjCustomerGuai);
    }

    /**
     * 批量删除用户占卜到的卦
     * 
     * @param ids 需要删除的用户占卜到的卦主键
     * @return 结果
     */
    @Override
    public int deleteYjCustomerGuaiByIds(Long[] ids)
    {
        return yjCustomerGuaiMapper.deleteYjCustomerGuaiByIds(ids);
    }

    /**
     * 删除用户占卜到的卦信息
     * 
     * @param id 用户占卜到的卦主键
     * @return 结果
     */
    @Override
    public int deleteYjCustomerGuaiById(Long id)
    {
        return yjCustomerGuaiMapper.deleteYjCustomerGuaiById(id);
    }
}
